Workflow Engine deployment with Docker
The Workflow Engine is packaged as a Docker image for easy deployment. The containerized deployment simplifies the installation and configuration process, making it easier to manage and scale the Workflow Engine.
This guide will walk you through deploying the Workflow Engine in a Docker container using Docker Compose.
Prerequisites
Before you begin, ensure you have the following:
- A Docker installation on your local machine.
- Configured Docker registry credentials for the Workflow Engine Docker images.
Deploy the Workflow Engine
Appendix B contains a sample Docker Compose file that you can use to deploy the Workflow Engine.
The Docker Compose file includes the Workflow Studio UI and Workflow Engine services. It is also configured to use the same PostgreSQL database and Redis cache services as the other services in this guide.
Create a working folder for the Workflow Engine deployment and copy the template into a docker-compose.yml
file in this folder.
Prepare the configuration files for the Workflow Engine, as per the previous section, and save them in the same folder as the docker-compose.yml
file.
Customize as neccesary to suit your environment and then run the following command to deploy the Workflow Engine:
docker-compose -f workflow-compose.yml up -d
The Workflow Engine will be deployed and started in the background. You can check the logs to ensure that the service has started successfully.
docker-compose -f workflow-compose.yml logs -f
Create yourself a few helper shell scripts to make executing these commands easier.
The log output should look similar to the following:
/data/one37/wfe$ ./launch.sh
[+] Running 1/1
✔ wfe Pulled
[+] Running 1/1
✔ Container wfe Recreated
Attaching to wfe
wfe | ENV not set. Attempting to locate CONFIG file
wfe | /app/dist/config/host-config.json
wfe | [2025-02-20 08:23:17.325] Initializing global instanceName: PrimaryArbiter with role: arbiter
wfe | WorkflowManagement constructor
wfe | [2025-02-20 08:23:17.332] system - - - - - Initialization Started...
wfe | [2025-02-20 08:23:17.464] Subscriber client connected to Redis
wfe | [2025-02-20 08:23:17.464] Connected to Redis!
wfe | [2025-02-20 08:23:17.523] Workflow AppServicesAuth@1.0 registration ...
wfe | [2025-02-20 08:23:17.526] Workflow ParentalControl@1.0 registration ...
wfe | [2025-02-20 08:23:17.530] Workflow RegisterEmailAlias@1.0 registration ...
wfe | [2025-02-20 08:23:17.532] Workflow SignInToBusiness@1.0 registration ...
wfe | [2025-02-20 08:23:17.534] Workflow SignUpToBusiness@1.0 registration ...
wfe | [2025-02-20 08:23:17.551] Workflow ValidateDriversLicense@1.0 registration ...
wfe | [2025-02-20 08:23:17.568] Workflow VerifyEmail@1.0 registration ...
wfe | [2025-02-20 08:23:17.569]False - Primary is not Alive
wfe | [2025-02-20 08:23:17.569] PrimaryArbiter - - - - - 🚀 Starting as Primary Arbiter
wfe | [2025-02-20 08:23:17.570] PrimaryArbiter - - - - - 🚀 Starting as Primary Arbiter on port 7515
wfe | [2025-02-20 08:23:17.570] Initializing global instanceName: PrimaryArbiter with role: primary-arbiter
wfe | [2025-02-20 08:23:17.573] Arbiter - - - - - 🏁 Engine routing initializing...
wfe | [2025-02-20 08:23:17.576] PrimaryArbiter - - - - - ⚙️ Workflow engine listening at http://localhost:7515.
wfe | [2025-02-20 08:23:17.582] PrimaryArbiter - - - - - Subscribing to system messages on wfe:system:PrimaryArbiter
wfe | [2025-02-20 08:23:17.582] PrimaryArbiter - - - - - 👑👑👑 Primary Arbiter initialized and listening for messages.
wfe | ENV not set. Attempting to locate CONFIG file
wfe | /app/dist/config/host-config.json
wfe | [2025-02-20 08:23:18.398] Initializing global instanceName: PrimaryArbiter with role: arbiter
wfe | WorkflowManagement constructor
wfe | [2025-02-20 08:23:18.405] system - - - - - Initialization Started...
wfe | [2025-02-20 08:23:18.523] Connected to Redis!
wfe | [2025-02-20 08:23:18.524] Subscriber client connected to Redis
wfe | [2025-02-20 08:23:18.583] Workflow AppServicesAuth@1.0 registration ...
wfe | [2025-02-20 08:23:18.586] Workflow ParentalControl@1.0 registration ...
wfe | [2025-02-20 08:23:18.588] Workflow RegisterEmailAlias@1.0 registration ...
wfe | [2025-02-20 08:23:18.589] Workflow SignInToBusiness@1.0 registration ...
wfe | [2025-02-20 08:23:18.591] Workflow SignUpToBusiness@1.0 registration ...
wfe | [2025-02-20 08:23:18.608] Workflow ValidateDriversLicense@1.0 registration ...
wfe | [2025-02-20 08:23:18.626] Workflow VerifyEmail@1.0 registration ...
wfe | [2025-02-20 08:23:18.630] PrimaryArbiter - - - - - 🔔 New requestDeploymentConfig message received at key:
wfe | [2025-02-20 08:23:23.632] Initializing global instanceName: node-1 with role: worker
wfe | [2025-02-20 08:23:23.633] node-1 - - - - - Subscribing to IntentToLock channel: newIntentToLock_channel:localhost:node-1
wfe | [2025-02-20 08:23:23.634] node-1 - - - - - Subscribing to system messages on wfe-gsn:localhost:system:node-1
wfe | [2025-02-20 08:23:23.634] node-1 - - - - - Subscribing to keepAlive:PrimaryArbiter
wfe | [2025-02-20 08:23:23.634] node-1 - - - - - 🏁 Workflow Server initialized.
wfe | [2025-02-20 08:23:28.638] New server: node-1 on host: localhost
wfe | [2025-02-20 08:23:28.638] PrimaryArbiter - - - - - ➕ Server node-1 on host localhost added to available servers list.